﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Abp.Authorization.Users;
using Abp.Extensions;

namespace WebApp.Authorization.Users
{
    public class User : AbpUser<User>
    {
        public const string DefaultPassword = "123qwe";

        public static string CreateRandomPassword()
        {
            return Guid.NewGuid().ToString("N").Truncate(16);
        }

        public static User CreateTenantAdminUser(Guid tenantId, string emailAddress)
        {
            var user = new User
            {
                TenantId = tenantId,
                UserName = AdminUserName,
                Name = AdminUserName,
                Surname = AdminUserName,
                EmailAddress = emailAddress,
                Roles = new List<UserRole>()
            };

            user.SetNormalizedNames();

            return user;
        }

      
     /// <summary>
     /// 所属公司Id
     /// </summary>
        public virtual Guid CompanyId { get; set; }

        [StringLength(MaxUserNameLength)]
        public virtual string Language { get; set; }
        /// <summary>
        /// 是否推送基站离线
        /// </summary>
        public virtual bool IsPushOffLineMSG { get; set; }

        /// <summary>
        /// 登录 后打开的页面 管理模块Id
        /// </summary>
        public virtual Guid UiMenuId { get; set; }
       




    }
}
